package com.itheima.iostream;

import java.io.FileInputStream;
import java.io.IOException;
import java.util.Arrays;

public class Demo07 {

    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("day12\\b.txt");
        byte[] bytes= new byte[1024];//1kb 准备了一个空数组   长度是1024

        int len = fis.read(bytes);//len  对了多少个字节
        System.out.println(Arrays.toString(bytes));
        System.out.println("读到的长度是"+len);
        String s = new String(bytes, 0, len);
        System.out.println(s);
        fis.close();
    }
}
